package com.bjc.platform.vo;

public class FunctionItem {
	private String id;// 数据库中的id
	private String name;// 描述
	private String icon;// 展现的icon
	private String resource;// 对应的资源
	private boolean leaf;// 是否有子节点

	public FunctionItem() {
		super();
		this.leaf = true;
	}
	

	public FunctionItem(String name, String resource) {
		this.name = name;
		this.resource = resource;
	}


	public FunctionItem(String id, String name, String icon, String resource,
			boolean leaf) {
		super();
		this.id = id;
		this.name = name;
		this.icon = icon;
		this.resource = resource;
		this.leaf = leaf;
	}

	/**
	 * @param id 树上面的ID
	 * @param name 树节点的名字
	 * @param leaf 有没有子节点
	 */
	public FunctionItem(String id, String name, boolean leaf) {
		this.id = id;
		this.name = name;
		this.leaf = leaf;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getResource() {
		return resource;
	}

	public void setResource(String resource) {
		this.resource = resource;
	}

	public boolean isLeaf() {
		return leaf;
	}

	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}

	// 用来返回节点值
	public String getText() {
		return this.name;
	}
}
